// FolderBrowser.cpp: implementation of the TFolderBrowser class.
//
//////////////////////////////////////////////////////////////////////

#include "FolderBrowser.h"
#include <aknquerydialog.h>			// For CAknTextQueryDialog class
#include <TagChanger.rsg>			// For resource definition

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

TFolderBrowser::TFolderBrowser()
{

}

TFolderBrowser::~TFolderBrowser()
{

}

TBool TFolderBrowser::BrowseFolderL(TFileName& aPath)
{
	CAknTextQueryDialog* dlg = new( ELeave ) CAknTextQueryDialog(aPath);
	// Prepares the dialog, constructing it from the specified resource
	dlg->PrepareLC( R_TAGCHANGER_FOLDER_BROWSER_1ST );
	// Sets the maximum length of the text editor
	dlg->SetMaxLength(KMaxFileName);
	
	// Launch the dialog
	if (dlg->RunLD())
	{
		// ok pressed, text is the descriptor containing the entered text // in the editor.
		return ETrue;
	}
	
	return EFalse;
}